package com.lotusfall.vo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@AllArgsConstructor
public class WebResult {
    @JsonProperty
    private Integer Code;
    @JsonProperty
    private String Msg;
    @JsonProperty
    private List<?> Data;
    @JsonIgnore
    public Integer getCode() {
        return Code;
    }
    @JsonIgnore
    public String getMsg() {
        return Msg;
    }
    @JsonIgnore
    public List<?> getData() {
        return Data;
    }


    @JsonIgnore
    public static WebResult ok(List<?> body){
        return new WebResult(0,"成功！",body);
    }
    @JsonIgnore
    public static WebResult ok(List<?> list,String msg){
        return new WebResult(200,msg,list);
    }


}
